﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using NetDon.Utilities;

namespace NetDon.OA.Interface.eLogistics
{
    public interface IReportQueryService
    {
        DataTable QueryIsuingOrderQuery(IssuingOrderSearchCriteria issuingOrderSearchCriteria, string tableName);
        System.Data.DataTable QueryIsuingOrderQueryDelivery(IssuingOrderSearchCriteria criteria, string tableName);
        System.Data.DataTable QueryShuntingTrackInfoQuery(IssuingOrderSearchCriteria criteria, string tableName);
         System.Data.DataTable QueryOnsiteEntruckingQuery(IssuingOrderSearchCriteria criteria, string tableName);

         System.Data.DataTable QueryOnwayTrackQuery(IssuingOrderOnWayTrackSearchCriteria criteria,
                                                          string tableName);

        System.Data.DataTable QueryReceiptInfoTrackQuery(IssuingOrderReceiptInfoTrackSearchCriteria criteria,
                                                         string tableName);

        System.Data.DataTable QueryPaymentMachineAccount(MachineAccountSearchReportCriteria criteria,
                                                        string tableName);

        System.Data.DataTable QueryPaymentMachineAccountDetails(MachineAccountSearchReportCriteria criteria,
                                                                string tableName);
        System.Data.DataTable QueryGoodsShippingExceptionQuery(GoodsShippingExceptionQueryCriteria criteria, string tableName);

        System.Data.DataTable QueryReceiptInfoQuery(ReceiptInfoQueryCriteria criteria, string tableName);

        System.Data.DataTable QueryPaymentMachineAccountDeduction(MachineAccountSearchCriteria criteria,
                                                                  string tableName);

        System.Data.DataTable QueryGoodsShippingOnWayTrackSummary(GoodsShippingStatusQueryCriteria criteria,
                                                                  string tableName);

        DataTable QueryIssuingTotalOrder(IIssuingTotalOrder issuingTotalOrder, string tableName);


    }


    public class GoodsShippingExceptionQueryCriteria
    {
        public Guid? RouteTypeId { get; set; }
        public Guid? AreaId { get; set; }


    }

    public class GoodsShippingStatusQueryCriteria
    {
        public Guid? RouteTypeId { get; set; }
        public Guid? AreaId { get; set; }
        public Range<DateTime?> ReceivingOrderDate { get; set; }
        public Range<DateTime?> ActualShippingDate { get; set; }
        public Range<DateTime?> ActualDeliveredDate { get; set; }

        

    }

 
    public class ReceiptInfoQueryCriteria
    {
        public Guid? RouteTypeId { get; set; }
        public Guid? AreaId { get; set; }
        public Range<DateTime?> ReceiptInfoPlannedResponseDate { get; set; }
        public Range<DateTime?> ActualShippingDate { get; set; }
        public Range<DateTime?> ReceivingOrderDate { get; set; }
        
    }

    [Serializable]
    public class MachineAccountSearchReportCriteria
    {

        public string OrderCode { get; set; }
        public Guid? AreaId { get; set; }
        public string TransportationPlanCode { get; set; }

        public Guid? RouteTypeId { get; set; }
        public Guid? PaymentMethod { get; set; }


        public Range<DateTime?> PaymentOrIncomeDate { get; set; }
        public string Driver { get; set; }
        public decimal? PendingShippingCostStart { get; set; }
        public decimal? PendingShippingCostEnd { get; set; }
        public Range<DateTime?> ActualShippingDate { get; set; }

        public Guid? IssuingOrderId { get; set; }
    }
}
